import request from '@/utils/request'

export function getList(bookName, pageNo, pageSize) {
  return request({
    url: `/book/find?bookName=${bookName}&pageNo=${pageNo}&pageSize=${pageSize}`,
    method: 'get'
  })
}

export function deleteBook(bookId) {
  return request({
    url: `/book/delete?id=${bookId}`,
    method: 'delete'
  })
}

export function updateBook(id, data) {
  return request({
    url: `/book/update?id=${id}`,
    method: 'put',
    data
  })
}
